//
//  PlayResultLayer.cpp
//  NewMath
//
//  Created by Ngô Hoàng Nam on 1/3/15.
//
//

#include "PlayResultLayer.h"
#include "../PlayManager.h"
#include "../../../BaseObject/BaseGhostObj.h"
#include "../Object/ResultGhostObj.h"

PlayResultLayer::PlayResultLayer(Size screenSize)
{
    m_screenSize = screenSize;
}
void PlayResultLayer::initalize(std::string equation, EGameStatus m_EGameStatus)
{
    ResultGhostObj* ghost  = new ResultGhostObj();
	equation.replace(equation.find("?"), 1, String::createWithFormat("%d",GamePlayConfig::GetInstance()->m_selectNumber)->getCString());

    ghost->initGhost("ghost_purple.png",equation , Vec2(m_screenSize.width/2,m_screenSize.height/2), m_screenSize.height/4,m_EGameStatus);
    BaseGhostObj::addToLayer(this, ghost);
    //this->addChild(ghost);
}